<?php include_once("comum/topo.php");
	include_once 'classes/banco/db.class.php';
	include_once 'classes/estados.control.class.php';
		
	$estadosControl = new EstadosControl();
	$estados = $estadosControl->selectAll();
	
?>
	<h1>CADASTRO</h1>
    <div id="f">
    	<form method="post" action="classes/comum.php" id="formulario" name="formulario" >
        	<fieldset style="border: none;">
            	<ul>
                	<li>
                		<label for="name">Nome Completo:</label>
                        <input type="text" id="name" name="name" class="required" value="" />
                	</li>
                    <li>
                    	<label for="sexo">Sexo:</label>
							<label for="masc">Masculino</label><input type="radio" id="masc" value="Masculino" name="sexo">
							<label for="fem">Feminino</label><input type="radio" id="fem" value="Feminino" name="sexo">
                    </li>
                    <br />
                    <li>
                		<label for="cpf">CPF:</label>
                        <input type="text" id="cpf" name="cpf" class="required" maxlength="14" onkeypress="HFMascara(this, HFInteger)" value="" />
                	</li>
                    <li>
                		<label for="rg">RG:</label>
                        <input type="text" id="rg" name="rg" class="required" maxlength="14" onkeypress="HFMascara(this, HFInteger)" value="" />
                	</li>
                    <li>
                		<label for="FKrg_uf">Estado RG:</label>
                        <select id="FKrg_uf" name="FKrg_uf">
                        	<option value=""></option>
                            <?php for ($i = 0; $i < sizeof($estados); $i++): ?>
                        	<option value="<? echo $estados[$i]['id']?>"><? echo $estados[$i]['sigla'] ?></option>
                            <?php endfor; ?>
                        </select>
                	</li>
                    <li>
        				<label for="birth">Data Nascimento:</label>
                        <input type="text" id="birth" name="birth" onkeypress="HFMascara(this, HFData)" class="required" value="" />
                	</li>
                    <br />
                    <li>
    					<label for="user">Login:</label>
                        <input type="text" id="user" name="user" class="required" value="" />
                	</li>
                    <li>
        				<label for="password">Senha:</label>
                        <input type="password" id="password" name="password" class="required" value="" />
                	</li>
                    <li>
        				<label for="password2">Digite novamente a senha:</label>
                        <input type="password" id="password2" name="password2" class="required" value="" />
                	</li>
                    <li>
        				<label for="email">Email:</label>
                        <input type="text" id="email" name="email" class="required" value="" />
                	</li>
                    
                    <br />
                    <br />
                    <li>
                    	<label for="cep">Cep:</label>
                        <input type="text" id="cep" name="cep" maxlength="9" onkeypress="HFMascara(this, HFCep)" value="" />
                        <input type="button" value="Auto-Preencher" id="busca_cep" name="busca_cep" class="required" />
                        <input type="button" value="Trocar o CEP" id="troca_cep" name="troca_cep" />
                    </li>
                    <li>
                    	<label for="logradouro">Logradouro:</label>
                        <input type="text" id="logradouro" name="logradouro" disabled="disabled" value="" />
                    </li>
                    <li>
                    	<label for="bairro">Bairro:</label>
                        <input type="text" id="bairro" name="bairro" disabled="disabled" value="" />
                    </li>
                    <li>
                    	<label for="cidade">Cidade:</label>
                        <input type="text" id="cidade" name="cidade" disabled="disabled" value="" />
                    </li>
                    <li>
                    	<label for="uf">Estado:</label>
                        <input type="text" id="uf" name="uf" disabled="disabled" value="" />
                    </li>
                    <input type="hidden" id="cep2" name="cep2" value=""/>
                    <input type="hidden" id="logradouro2" name="logradouro2" value=""/>
                    <input type="hidden" id="bairro2" name="bairro2" value=""/>
                    <input type="hidden" id="cidade2" name="cidade2" value=""/>
                    <input type="hidden" id="uf2" name="uf2" value=""/>
                    
                </ul>
            </fieldset>
            <input type="hidden" name="action" value="usercomum_insert" />
            <input type="submit" id="inscricao" name="inscricao" value="Cadastrar-se" onclick="return validaCadastroComum()" />
		</form>
    </div>
    <br />
    <br />
    <a href="index.php">Voltar para Index</a>


<?php include_once("comum/rodape.php")?>